package com.tul.exercise.base.fanclass.eg2;

/**
 * @Description 《java编程思想》15 泛型.1 示例 3
 *  元组类:测试类
 *
 **/
public class TupleTest {

    public static TwoTuple<String, Integer> f() {
        return new TwoTuple<>("Cat", 20);
    }

    public static ThreeTuple<Amphibian,String, Integer> g() {
        return new ThreeTuple<>(new Amphibian(), "Cat", 20);
    }

    public static FourTuple<Vehicle,Amphibian,String, Integer> h() {
        return new FourTuple<>(new Vehicle(),new Amphibian(), "Cat", 20);
    }

    public static void main(String[] args) {
        TwoTuple<String, Integer> t = f();
        System.out.println(t.toString());

        System.out.println(g());
        System.out.println(h());
    }
}
